jQuery(document).ready(function() {
	
	//创建JQGRID表格
	var grid = $("#table1").ligerGrid({
        columns: [
                  { display: '物料编码', name: 'wlCode', width: 120},
                  { display: '物料名称', name: 'wlName', width: 120 },
                  { display: '订单号', name: 'pocode', width: 150 },
                  { display: '基本单位', name: 'junit', width: 150 },
                  { display: '当前单位', name: 'unit', width: 150 },
                  { display: '订单',columns: [
						{ display: '订单基本单位数量', name: 'ddJquantity', width: 150 ,render:function(row){
							  
							  if(row.ddJquantity == null || row.ddJquantity == ''){
								  return '0.0';
							  }
							  return (row.ddJquantity).toFixed(4);
						}},
						{ display: '订单当前单位数量', name: 'ddQuantity', width: 150 ,render:function(row){
							  
							  if(row.ddQuantity == null || row.ddQuantity == ''){
								  return '0.0';
							  }
							  return (row.ddQuantity).toFixed(4);
						}}
//						{ display: '订单物料单价', name: 'ddPrice', width: 100},
//						{ display: '总金额', name: 'sumMoney', width: 100},
		               ]},
		               
		               { display: '入库',columns: [
							{ display: '基本单位入库数量', name: 'rkJquantity', width: 120 ,render:function(row){
								  
								  if(row.rkJquantity == null || row.rkJquantity == ''){
									  return '0.0';
								  }
								  return (row.rkJquantity).toFixed(4);
							}},
							{ display: '当前单位入库数量', name: 'rkQuantity', width: 100 ,render:function(row){
								  
								  if(row.rkQuantity == null || row.rkQuantity == ''){
									  return '0.0';
								  }
								  return (row.rkQuantity).toFixed(4);
							}}
							   ]},
							   
					{ display: '未入库',columns: [
          					{ display: '基本单位未入库数量', name: 'wrkJquantity', width: 150 ,render:function(row){
                	  
			                if(row.wrkJquantity == null || row.wrkJquantity == ''){
			                		  return '0.0';
			                	}
			                	  return (row.wrkJquantity).toFixed(4);
			                  }},
			                  { display: '当前单位未入库数量', name: 'wrkQuantity', width: 150 ,render:function(row){
			                	  
			                	  if(row.wrkQuantity == null || row.wrkQuantity == ''){
			                		  return '0.0';
			                	  }
			                	  return (row.wrkQuantity).toFixed(4);
			                  }}
          							   ]}		   
                  
                  ],  usePager: true,pageSize:15,pageSizeOptions :[15,30,45,60],enabledSort:false,
                      url : basic_Url+"/list.do",
                      width: '100%', height: '98%', checkbox: false,rownumbers:true
                  });
	$("#pageloading").hide();
	
	
});
